﻿/// <reference path="../../../extjs/ext-all-debug.js" />
Ext.define('yzmh.view.class.List', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.classlist',
    closable: true,
    store: 'Classes',
    loadMask: true,
    columnLines: true,
    forceFit: true,
    sortableColumns: false,
    viewConfig: {
        trackOver: true,
        stripeRows: true,
        plugins: {
            ptype: 'gridviewdragdrop'
        }
    },
    tbar: [
            { xtype: 'tbfill' },
            { action: 'htmlall', text: '生成全部分类', icon: 'extjs/icons/html_go.png' }, "-",
            { action: 'add', text: '新增', icon: 'extjs/icons/link_add.png' }, "-",
            { action: 'delete', text: '删除', icon: 'extjs/icons/link_delete.png' }
    ],
    selType: 'rowmodel',
    selModel: Ext.create("Ext.selection.RowModel", {
        mode: 'MULTI'
    }),
    columns: [
        { header: '编号', dataIndex: 'id', align: 'center', width: 50 },
        { header: '分类名称', dataIndex: 'classname', width: 100 },
        { header: '文件名称', dataIndex: 'filename', width: 100 },
         {
             action: 'view',
             xtype: 'actioncolumn',
             width: 40,
             header: '预览',
             align: 'center',
             icon: 'extjs/icons/package_link.png'
         }
    ],
    bbar: {
        xtype: 'statusbar',
        text: '就绪',
        iconCls: 'x-status-valid',
        items: [
            {
                xtype: 'progressbar',
                text: '正在初始化...',
                width: 200,
                hidden: true
            }
        ]
    }
});


